type Algebra f a = f a -> a